cmake_minimum_required(VERSION 3.24)
project(hello_openxr_demo)

set(CMAKE_CXX_STANDARD 14)

include_directories("include")

add_executable(hello_openxr_demo main.cpp glad.c)

# OpenGL
find_package(OpenGL REQUIRED)

# X11
find_package(X11 REQUIRED)
SET(LINUX_LIBS "Xrandr ${X11_LIBRARIES}" m)

# OpenXR
find_package(OpenXR REQUIRED)
target_include_directories(hello_openxr_demo PRIVATE OpenXR::Headers)
target_link_libraries(hello_openxr_demo PRIVATE OpenXR::openxr_loader)

# glfw3
find_package(glfw3 REQUIRED)
target_link_libraries(hello_openxr_demo PRIVATE glfw)

#xlib
target_link_libraries(hello_openxr_demo PRIVATE ${LINUX_LIBS} ${OPENGL_LIBRARIES})
